package base.bean;

import javax.persistence.*;

/**
 * Created by 30509 on 2018/3/18.
 */
@Entity
@Table(name = "checkout", schema = "hotel", catalog = "")
public class CheckoutEntity {
    private int id;
    private Integer liveid;
    private String personname;
    private String roomid;
    private String cardtype;
    private String cardid;
    private Integer cips;
    private String phone;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "liveid")
    public Integer getLiveid() {
        return liveid;
    }

    public void setLiveid(Integer liveid) {
        this.liveid = liveid;
    }

    @Basic
    @Column(name = "personname")
    public String getPersonname() {
        return personname;
    }

    public void setPersonname(String personname) {
        this.personname = personname;
    }

    @Basic
    @Column(name = "roomid")
    public String getRoomid() {
        return roomid;
    }

    public void setRoomid(String roomid) {
        this.roomid = roomid;
    }

    @Basic
    @Column(name = "cardtype")
    public String getCardtype() {
        return cardtype;
    }

    public void setCardtype(String cardtype) {
        this.cardtype = cardtype;
    }

    @Basic
    @Column(name = "cardid")
    public String getCardid() {
        return cardid;
    }

    public void setCardid(String cardid) {
        this.cardid = cardid;
    }

    @Basic
    @Column(name = "cips")
    public Integer getCips() {
        return cips;
    }

    public void setCips(Integer cips) {
        this.cips = cips;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CheckoutEntity that = (CheckoutEntity) o;

        if (id != that.id) return false;
        if (liveid != null ? !liveid.equals(that.liveid) : that.liveid != null) return false;
        if (personname != null ? !personname.equals(that.personname) : that.personname != null) return false;
        if (roomid != null ? !roomid.equals(that.roomid) : that.roomid != null) return false;
        if (cardtype != null ? !cardtype.equals(that.cardtype) : that.cardtype != null) return false;
        if (cardid != null ? !cardid.equals(that.cardid) : that.cardid != null) return false;
        if (cips != null ? !cips.equals(that.cips) : that.cips != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (liveid != null ? liveid.hashCode() : 0);
        result = 31 * result + (personname != null ? personname.hashCode() : 0);
        result = 31 * result + (roomid != null ? roomid.hashCode() : 0);
        result = 31 * result + (cardtype != null ? cardtype.hashCode() : 0);
        result = 31 * result + (cardid != null ? cardid.hashCode() : 0);
        result = 31 * result + (cips != null ? cips.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        return result;
    }
}
